<script type="text/html" template lay-done="layui.data.getHistoryDone(d);">
    <div id="custom-history-table" lay-filter="history-table-filter"></div>
</script>
<style>
</style>

<script>
    layui.data.getHistoryDone = function(d){
        layui.use(['admin', 'table'], function(){
            var admin = layui.admin,
                table = layui.table;
            d.params.history && initTable(d.params.history);

            function initTable(data){
                table.render({
                    elem: '#custom-history-table'
                    ,height: 350
                    ,text: {
                        none: '<div class="no-data-tips"><img src="/src/style/res/about/empty.png"><p style="color:#DBDBDB;">暂无数据</p></div>'
                    }
                    ,cellMinWidth: 80 
                    ,even: true,
                    cols: [[
                        { type: 'numbers', title: '序号' },
                        { field: 'username', title: '操作人', align: 'center' },
                        { field: 'createtime', title: '操作时间', align: 'center' },
                        { field: 'content', title: '日志内容', align: 'center', templet: function(d){
                                return '<span lay-tips="'+ d.content +'">'+ d.content +'</span>'
                            } 
                        },
                        { field: 'usermemo', title: '备注', align: 'center', templet: function(d){
                                return '<span lay-tips="'+ d.usermemo +'">'+ d.usermemo+'</span>'
                            }
                         }
                    ]],
                    data: data
                });
            }
        });
    }
</script>
